package com.example.ui.dialogs;

import ag.AGModelManager;
import ag.ui.AGButton;
import ag.ui.AGControl;
import ag.ui.AGTextBox;
import ag.ui.IAGEventHandler;
import android.graphics.RectF;

public class TestInputDialog extends BaseDialog {
	private AGTextBox _textBox;
	private AGButton _btnTestVisible;
	
	public TestInputDialog(){
		super();
		
		this._textBox = new AGTextBox();
		this._textBox.setPosition(200, 100);
		this._textBox.setWidth(400);
		this._textBox.setHeight(40);
		this.addControl(this._textBox);
		
		this._btnTestVisible = new AGButton(new RectF(200, 200, 200+48, 200+48), AGModelManager.getInstance().getModel(2103));
		this._btnTestVisible.addClickEvent(new BtnClick());
		this.addControl(_btnTestVisible);
	}
	
	class BtnClick implements IAGEventHandler{

		@Override
		public void onHandle(AGControl control) {
			// TODO Auto-generated method stub
			_textBox.setVisible(!_textBox.getVisible());
		}
	}
}
